import {
    Home,
    Swiper,
    // AddShop,
    Shop,
    Recommend,
    SecondKill,
    Brand,
    Comment,
    Customer,
    Admin,
    Order,
    OrderSend,
    OrderComplete,
    OrderReturnBack,
    AddMsg,
    ShowMsg,
    UserBack
} from '../views'

import {
    ShoppingOutlined,
    AppstoreOutlined,
    CodeSandboxOutlined,
    TagsOutlined,
    SkinOutlined,
    PlusOutlined,
    ThunderboltOutlined,
    BulbOutlined,
    PictureOutlined,
    UserOutlined,
    UnorderedListOutlined,
    CommentOutlined,
    CheckOutlined,
    RotateRightOutlined,
    RotateLeftOutlined,
    UserSwitchOutlined, ClockCircleOutlined, LineChartOutlined, AreaChartOutlined, PieChartOutlined,
} from '@ant-design/icons'

import { createFromIconfontCN } from '@ant-design/icons'
import Sale from '../views/Statisic/chart/Classify'
import AddQuit from '../views/Shop/AddQuit'
import Brands from '../views/Brand/Brands'
import Classifys from '../views/Classify/Classifys'

const IconFont = createFromIconfontCN({
    scriptUrl: [
        'https://at.alicdn.com/t/font_2867610_a5pziy318gq.js'
    ],
})

const getRouterList = () => {
    return [{
        key: '0-0',
        value: '0-0',
        path: '/home',
        title: '数据分析',
        icon: <AreaChartOutlined/>,
        component: Home,
        children: [{
            key: '0-0-0',
            value: '0-0-0',
            path: '/home/statistic',
            title: '数据总览',
            icon: <LineChartOutlined/>,
            component: Home
        }, {
            key: '0-0-1',
            value: '0-0-1',
            path: '/home/sale',
            title: '销量统计',
            icon: <PieChartOutlined/>,
            component: Sale
        }]
    }, {
        key: '0-1',
        value: '0-1',
        path: '/swiper',
        title: '轮播图管理',
        component: Swiper,
        icon: <PictureOutlined/>
    },
        // {
        //     key: '0-2',
        //     value: '0-2',
        //     path: '/activity',
        //     component: AddActivity,
        //     title: '活动管理',
        //     icon: <IconFont type="icon-liwuhuodong"/>,
        //     children: [{
        //         key: '0-2-0',
        //         value:'0-2-0',
        //         path: '/activity/add',
        //         component: AddActivity,
        //         title: '添加活动',
        //         icon: <PlusOutlined/>,
        //     }, {
        //         key: '0-2-1',
        //         value: '0-2-1',
        //         path: '/activity/list',
        //         component: ShowActivity,
        //         title: '活动列表',
        //         icon: <UnorderedListOutlined/>
        //     }]
        // },
        {
            key: '0-3',
            value: '0-3',
            path: '/pro',
            title: '产品管理',
            icon: <CodeSandboxOutlined/>,
            component: Brand,
            children: [{
                key: '0-3-0',
                value: '0-3-0',
                path: '/pro/brand',
                title: '品牌管理',
                icon: <TagsOutlined/>,
                component: Brands
            }, {
                key: '0-3-1',
                value: '0-3-1',
                path: '/pro/classify',
                title: '分类管理',
                icon: <AppstoreOutlined/>,
                component: Classifys
            }, {
                key: '0-3-2',
                value: '0-3-2',
                path: '/pro/shop',
                title: '商品管理',
                icon: <ShoppingOutlined/>,
                component: Shop,
                children: [{
                    key: '0-3-2-0',
                    value: '0-3-2-0',
                    path: '/pro/shop/add',
                    title: '添加商品',
                    icon: <PlusOutlined/>,
                    component: AddQuit
                }, {
                    key: '0-3-2-1',
                    value: '0-3-2-1',
                    path: '/pro/shop/all',
                    title: '商品列表',
                    icon: <SkinOutlined/>,
                    component: Shop
                }, {
                    key: '0-3-2-2',
                    value: '0-3-2-2',
                    path: '/pro/shop/recommend',
                    title: '推荐商品',
                    icon: <BulbOutlined/>,
                    component: Recommend
                }, {
                    key: '0-3-2-3',
                    value: '0-3-2-3',
                    path: '/pro/shop/second',
                    title: '秒杀商品',
                    icon: <ThunderboltOutlined/>,
                    component: SecondKill
                }]
            }, {
                key: '0-3-3',
                value: '0-3-3',
                path: '/pro/comment',
                title: '商品评价',
                icon: <CommentOutlined/>,
                component: Comment
            }]
        }, {
            key: '0-4',
            value: '0-4',
            path: '/order',
            title: '订单管理',
            icon: <IconFont type="icon-dingdan"/>,
            component: Order,
            children: [{
                key: '0-4-0',
                value: '0-4-0',
                path: '/order/list',
                title: '最新订单',
                icon: <ClockCircleOutlined/>,
                component: Order
            }, {
                key: '0-4-1',
                value: '0-4-1',
                path: '/order/send',
                title: '已发货订单',
                icon: <RotateRightOutlined/>,
                component: OrderSend
            }, {
                key: '0-4-2',
                value: '0-4-2',
                path: '/order/complete',
                title: '已完成订单',
                icon: <CheckOutlined/>,
                component: OrderComplete
            }, {
                key: '0-4-3',
                value: '0-4-3',
                path: '/order/return',
                title: '退货订单',
                icon: <RotateLeftOutlined/>,
                component: OrderReturnBack
            }]
        }, {
            key: '0-5',
            value: '0-5',
            path: '/msg',
            title: '消息中心',
            icon: <IconFont type="icon-tongzhi"/>,
            component: ShowMsg,
            children: [{
                key: '0-5-0',
                value: '0-5-0',
                path: '/msg/add',
                icon: <PlusOutlined/>,
                title: '发布消息',
                component: AddMsg
            }, {
                key: '0-5-1',
                value: '0-5-1',
                path: '/msg/list',
                icon: <UnorderedListOutlined/>,
                title: '消息列表',
                component: ShowMsg
            }, {
                key: '0-5-2',
                value: '0-5-2',
                path: '/msg/userback',
                icon: <UserSwitchOutlined/>,
                title: '用户反馈',
                component: UserBack
            }]
        }, {
            key: '0-6',
            value: '0-6',
            path: '/person',
            title: '用户管理',
            icon: <UserOutlined/>,
            component: Customer,
            children: [{
                key: '0-6-0',
                value: '0-6-0',
                path: '/person/user',
                title: '用户列表',
                icon: <UnorderedListOutlined/>,
                component: Customer
            }, {
                key: '0-6-1',
                value: '0-6-1',
                path: '/person/admin',
                title: '管理员列表',
                icon: <UnorderedListOutlined/>,
                component: Admin
            }]
        },
        // {
        //     key: '0-7',
        //     value: '0-7-1',
        //     path: '/test',
        //     title: '测试',
        //     icon: <UserOutlined/>,
        //     component: Demo
        // }
    ]
}

    export const routes = getRouterList()

    export default getRouterList
